import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class CServlet extends HttpServlet {

    public CServlet() {
        System.out.println("CServlet的默认无参构造器...");
    }



    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setCharacterEncoding("GBK");
        response.getWriter()
                .append("CServlet处理...")
                .append("\n")
                .append("servletPath-->").append(WebUtils.getServletPath(request))
                .append("\n")
                .append("pathWithinServletMapping-->").append(WebUtils.getPathWithinServletMapping(request))
                .flush();
    }


}